<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      padding: 0;
      margin: 0;
      box-sizing: border-box;
    }

    html,
    body {
      width: 100vw;
      height: 100vh;
    }

    #app {
      display: grid;
      width: 100%;
      height: 100%;
      grid-template-rows: 10fr repeat(48, 1fr);
      grid-template-columns: repeat(48, 1fr);
      background-color: green;

      row-gap: 10px;
      column-gap: 10px;
    }

    header {
      grid-row: 2 / span 4;
      grid-column: 2 / span 46;
      background-color: yellow;
      text-align: center;
    }

    main {
      grid-row: 6 / span 14;
      grid-column: 2 / span 46;
      background-color: pink;

      text-align: center;
    }
  </style>
</head>

<body>
  <div id="app">
    <header>
      id:<input type="text" v-model="id">
      Name:<input type="text" v-model="name">
      <input type="button" value="添加">
      搜索名称关键词:<input type="text">
    </header>

    <main>
      <table class="tab">
        <thead>
          <tr>
            <th>ID</th>
            <th>品牌名称</th>
            <th>添加时间</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          <tr v-for="(items,index) in list" :key="items.id">
            <td>{{items.id}}</td>
            <td>{{items.name}}</td>
            <td>{{items.ctime}}</td>
          </tr>
        </tbody>
      </table>
    </main>

  </div>
</body>
<script src="../js/vue.js"></script>
<script>
  const mv = new Vue({
    el: "#app",
    data: {
      id: "",
      name: "",
      list: [{
        id: 1,
        name: "犇池",
        ctime: new Date()
      }, {
        id: 2,
        name: "宝马",
        ctime: new Date()
      }, {
        id: 3,
        name: "保时捷",
        ctime: new Date()
      }]
    },
    methods: {}
  });
</script>

</html>